Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Modify  Terminal  Services  Broken  Connection  Settings  

 Content of Modify Terminal Services Broken Connection Settings.vbs
MD5 Hash: 56AAA0F09F3A05DB42A9A386C26C2DAA
' Description: Configures Terminal Services to permanently delete a session in case of a broken connection. To configure Terminal Services to merely disconnect the user from the session instead, pass the value 0 (instead of 1) to the BrokenConnection method.


Const DISCONNECT_USER = 1

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_TSSessionSetting")

For Each objItem in colItems
errResult = objItem.BrokenConnection(DISCONNECT_USER)
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a